package com.lzy.system.organization.dto.convert;

import com.lzy.system.organization.dto.SysUserMappingAllocationDTO;
import com.lzy.system.organization.entity.SysUserMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * description: 映射用户对于关系表 <br>
 * date: 2023/11/28 下午10:08 <br>
 * author: lcc <br>
 * version: 1.0 <br>
 */
@Mapper(componentModel = "spring")
public interface SysUserMappingConvert {
    @Mapping(source = "user_id", target = "user_id")
    @Mapping(source = "dep_id", target = "dep_id")
    SysUserMapping toSysUserMapping(SysUserMappingAllocationDTO sysUserMappingAllocationDTO);

    @Mapping(source = "user_id", target = "user_id")
    @Mapping(source = "dep_id", target = "dep_id")
    List<SysUserMapping> toSysUserMappingList(List<SysUserMappingAllocationDTO> sysUserMappingAllocationDTOList);
}
